import numpy
from shapely.geometry import Point

x = numpy.array([1.0, 0.2, 1.8, 2.3, 0.3])
y = numpy.array([1.1, 1.3, 0.2, 5.7, 0.5])

pointlist = []

for i in range(len(x)):
    pointlist.append(Point(x[i], y[i]))
    
mat = numpy.zeros((len(x), len(y)), float)

for i in range(len(pointlist)):
    for j in range(len(pointlist)):
        mat[i][j] = pointlist[i].distance(pointlist[j])

print mat
